package com.weixing.mall.provider.api.service;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.provider.api.fallback.LeaveMessageServiceFallback;
import com.weixing.mall.provider.api.model.dto.MemberMessageDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;
@FeignClient(value ="mall-provider-uac",configuration = FeignRibbonClientAutoConfiguration.class,fallback = LeaveMessageServiceFallback.class)
public interface LeaveMessageServiceRpc {

    @GetMapping("api/leavemessage/noReplyList")
    Map<String, Integer> noReplyList( @RequestParam(value = "uid")Long uid );



    @PostMapping("api/memberMessage/createMsg")
    Result createMsg(@RequestBody MemberMessageDto memberMessage );
}
